package lab02.test11;

import static java.lang.Math.sqrt;

public class Qudrate extends Rectangle {

    double diagonal;

    public double countDiagonal() {
        return sqrt(width * width + height * height);
    }

    Qudrate() {}

    public void printMyWay() {
        super.printMyWay();
        System.out.println("对角线长:" + countDiagonal());
    }

}
